package com.jilian.mydemo.api;


import com.jilian.mydemo.base.BaseDto;
import com.jilian.mydemo.base.BaseVo;
import com.jilian.mydemo.city.bean.ProvinceBean;
import com.jilian.mydemo.common.dto.AccountDto;
import com.jilian.mydemo.common.dto.BannerListDto;
import com.jilian.mydemo.common.dto.CommitOrderDto;
import com.jilian.mydemo.common.dto.CommiteDto;
import com.jilian.mydemo.common.dto.EvaluateDto;
import com.jilian.mydemo.common.dto.FinishImgDto;
import com.jilian.mydemo.common.dto.FinishPayDto;
import com.jilian.mydemo.common.dto.GoodsTypeDto;
import com.jilian.mydemo.common.dto.LeaveStatusDto;
import com.jilian.mydemo.common.dto.MemberDto;
import com.jilian.mydemo.common.dto.OrderDetailDto;
import com.jilian.mydemo.common.dto.OrderListDto;
import com.jilian.mydemo.common.dto.ParamsListDto;
import com.jilian.mydemo.common.dto.PartnerDescriptionDto;
import com.jilian.mydemo.common.dto.PerformDto;
import com.jilian.mydemo.common.dto.PerformListDto;
import com.jilian.mydemo.common.dto.PlanPathListDto;
import com.jilian.mydemo.common.dto.ProductDetailDto;
import com.jilian.mydemo.common.dto.ProductListDto;
import com.jilian.mydemo.common.dto.QuestionDto;
import com.jilian.mydemo.common.dto.ServiceProcessDto;
import com.jilian.mydemo.common.dto.ShopListDto;
import com.jilian.mydemo.common.dto.StudyListDto;
import com.jilian.mydemo.common.dto.VideoArticlesDto;
import com.jilian.mydemo.common.dto.VideoArticlesListDto;
import com.jilian.mydemo.common.dto.LoginDto;
import com.jilian.mydemo.common.dto.MsgListDto;
import com.jilian.mydemo.common.dto.MyInfoDto;
import com.jilian.mydemo.common.dto.WrongAnwserDto;
import com.jilian.mydemo.common.vo.AddProductToOrderVo;
import com.jilian.mydemo.common.vo.AppNoticeVo;
import com.jilian.mydemo.common.vo.AppUserInfoVO;
import com.jilian.mydemo.common.vo.ArticleDetailVo;
import com.jilian.mydemo.common.vo.BannerVo;
import com.jilian.mydemo.common.vo.BrowseArticleVO;
import com.jilian.mydemo.common.vo.ComminteListVo;
import com.jilian.mydemo.common.vo.DelayNoticeVo;
import com.jilian.mydemo.common.vo.FinishImgVo;
import com.jilian.mydemo.common.vo.FinishOrderVo;
import com.jilian.mydemo.common.vo.FinishPayVo;
import com.jilian.mydemo.common.vo.GoodDetailVo;
import com.jilian.mydemo.common.vo.LeaveVo;
import com.jilian.mydemo.common.vo.MemberVo;
import com.jilian.mydemo.common.vo.OrderVo;
import com.jilian.mydemo.common.vo.PartnerApplyVo;
import com.jilian.mydemo.common.vo.PerformanceVo;
import com.jilian.mydemo.common.vo.PhotoVerifyVo;
import com.jilian.mydemo.common.vo.ProductListVo;
import com.jilian.mydemo.common.vo.ProductToShoppingCartVo;
import com.jilian.mydemo.common.vo.ReportOrderVo;
import com.jilian.mydemo.common.vo.SendSmsVo;
import com.jilian.mydemo.common.vo.LoginVo;
import com.jilian.mydemo.common.vo.ServiceAreaVo;
import com.jilian.mydemo.common.vo.ServiceAreasStrVo;
import com.jilian.mydemo.common.vo.SubscribeVo;
import com.jilian.mydemo.common.vo.UpdatePasswordVo;
import com.jilian.mydemo.common.vo.UpdateShopCartVo;
import com.jilian.mydemo.common.vo.UpdateWorkVo;
import com.jilian.mydemo.common.vo.UserRegistVo;
import com.jilian.mydemo.common.vo.VisitSignVo;
import com.jilian.mydemo.common.vo.WithdrawCountVo;
import com.jilian.mydemo.common.vo.WithdrawOrderVo;
import com.jilian.mydemo.common.vo.WithdrawVo;
import com.jilian.mydemo.http.RequetRetrofit;
import com.jilian.mydemo.utils.HttpUtil;

import java.io.File;
import java.util.List;

import io.reactivex.Flowable;
import retrofit2.http.Body;
import retrofit2.http.POST;


public class Api {


    /**
     * 登录接口
     *
     * @param vo
     * @return
     */

    public static Flowable<BaseDto<LoginDto>> login(LoginVo vo) {
        return RequetRetrofit.getInstance().login(vo);
    }


    /**
     * 获取验证码
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> sendSms(SendSmsVo vo) {
        return RequetRetrofit.getInstance().sendSms(vo);
    }

    /**
     * 注册
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> regist(UserRegistVo vo) {
        return RequetRetrofit.getInstance().regist(vo);
    }

    /**
     * 实名认证卡口，根据返回状态进行跳转
     *
     * @return
     */
    public static Flowable<BaseDto<Integer>> check() {
        return RequetRetrofit.getInstance().check();
    }

    /**
     * 个人中心 个人信息接口
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<MyInfoDto>> info() {
        return RequetRetrofit.getInstance().info();
    }

    /**
     * 修改密码
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto> updateUserPassword(AppUserInfoVO vo) {
        return RequetRetrofit.getInstance().updateUserPassword(vo);
    }

    /**
     * 修改手机号
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto> updateUserPhone(AppUserInfoVO vo) {
        return RequetRetrofit.getInstance().updateUserPhone(vo);
    }

    /**
     * 消息查询接口列表
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<MsgListDto>> query(AppNoticeVo vo) {
        return RequetRetrofit.getInstance().query(vo);
    }

    /**
     * 消息读接口
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> read(AppNoticeVo vo) {
        return RequetRetrofit.getInstance().read(vo);
    }

    /**
     * 修改用户信息
     *
     * @param vo,
     * @param files
     * @param mediaType
     * @return
     */
    public static Flowable<BaseDto> updateUserInfo(ServiceAreasStrVo vo, List<File> files, String mediaType) {
        return RequetRetrofit.getInstance().updateUserInfo(HttpUtil.uploadParamAndFiles(vo, files, mediaType));
    }

    /**
     * @param vo
     * @param frontImg  正面
     * @param backImg   反面
     * @param mediaType
     * @return
     */
    public static Flowable<BaseDto> photoVerify(PhotoVerifyVo vo, List<File> frontImg, List<File> backImg, String mediaType) {
        return RequetRetrofit.getInstance().photoVerify(HttpUtil.uploadParamAndFiles(vo, frontImg, backImg, mediaType));
    }


    /**
     * 我的收藏
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<VideoArticlesListDto>> queryCollect(BaseVo vo) {
        return RequetRetrofit.getInstance().queryCollect(vo);
    }

    /**
     * 水工课堂列表
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<VideoArticlesListDto>> queryArticle(BaseVo vo) {
        return RequetRetrofit.getInstance().queryArticle(vo);
    }

    /**
     * 文章详情
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto<VideoArticlesDto>> queryAppArticleDetail(ArticleDetailVo vo) {
        return RequetRetrofit.getInstance().queryAppArticleDetail(vo);
    }

    /**
     * 配件商城
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<ProductListDto>> getAppProductList(ProductListVo vo) {
        return RequetRetrofit.getInstance().getAppProductList(vo);
    }

    /**
     *  获取商品类别
     * @return
     */
    public static Flowable<BaseDto<List<GoodsTypeDto>>> queryProductTypes() {
        return RequetRetrofit.getInstance().queryProductTypes();
    }


    /**
     * 收藏
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto> addCollect(@Body BrowseArticleVO vo) {
        return RequetRetrofit.getInstance().addCollect(vo);
    }

    /**
     * 获取商品详情
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<ProductDetailDto>> getAppProductDetail(@Body GoodDetailVo vo) {
        return RequetRetrofit.getInstance().getAppProductDetail(vo);
    }


    /**
     * 学习手册
     *
     * @return
     */
    public static Flowable<BaseDto<StudyListDto>> study() {
        return RequetRetrofit.getInstance().study();
    }


    /**
     * 随机20道题
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<List<QuestionDto>>> random() {
        return RequetRetrofit.getInstance().random();
    }

    /**
     * 提交答题结果
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto<CommiteDto>> submit(ComminteListVo vo) {
        return RequetRetrofit.getInstance().submit(vo);
    }


    /**
     * 查看错题
     *
     * @return
     */
    public static Flowable<BaseDto<List<WrongAnwserDto>>> wrong() {
        return RequetRetrofit.getInstance().wrong();
    }


    /**
     * 重置密码
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> updatePassword(UpdatePasswordVo vo) {
        return RequetRetrofit.getInstance().updatePassword(vo);
    }

    /**
     * 获取百万合作说明
     *
     * @return
     */
    public static Flowable<BaseDto<PartnerDescriptionDto>> getPartnerDescription() {
        return RequetRetrofit.getInstance().getPartnerDescription();
    }

    /**
     * @param vo
     * @param businessLicense 营业执照（文件）
     * @param storeLogo       店铺招牌（文件）
     * @param mediaType
     * @return
     */
    public static Flowable<BaseDto> partnerApply(PartnerApplyVo vo, List<File> businessLicense, List<File> storeLogo, String mediaType) {
        return RequetRetrofit.getInstance().partnerApply(HttpUtil.partnerApply(vo, businessLicense, storeLogo, mediaType));
    }


    /**
     * 获取合伙人申请状态
     *
     * @return
     */
    public static Flowable<BaseDto<PartnerDescriptionDto>> getPartnerApply() {
        return RequetRetrofit.getInstance().getPartnerApply();
    }

    /**
     * 点击去接单掉该接口
     *
     * @return
     */
    public static Flowable<BaseDto> clicked() {
        return RequetRetrofit.getInstance().clicked();
    }


    /**
     * 获取请假状态
     *
     * @return
     */
    public static Flowable<BaseDto<LeaveStatusDto>> getLeaveStatus() {
        return RequetRetrofit.getInstance().getLeaveStatus();
    }

    /**
     * 取消接单 请假
     *
     * @return
     */
    public static Flowable<BaseDto> leave(LeaveVo vo) {
        return RequetRetrofit.getInstance().leave(vo);
    }


    /**
     * 接单
     *
     * @return
     */
    public static Flowable<BaseDto> takeOrder() {
        return RequetRetrofit.getInstance().takeOrder();
    }

    /**
     * 获取广告列表
     *
     * @return
     */
    public static Flowable<BaseDto<BannerListDto>> getAppAdList(BannerVo vo) {
        return RequetRetrofit.getInstance().getAppAdList(vo);
    }

    /**
     * 订单列表
     *
     * @return
     */
    public static Flowable<BaseDto<OrderListDto>> query(OrderVo vo) {
        return RequetRetrofit.getInstance().query(vo);
    }


    /**
     * 抢单
     *
     * @return
     */
    public static Flowable<BaseDto> grabOrder(OrderVo vo) {
        return RequetRetrofit.getInstance().grabOrder(vo);
    }

    /**
     * 填写预约信息
     *
     * @return
     */
    public static Flowable<BaseDto> subscribe(SubscribeVo vo) {
        return RequetRetrofit.getInstance().subscribe(vo);
    }

    /**
     * 延时提醒
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> delayNotice(DelayNoticeVo vo) {
        return RequetRetrofit.getInstance().delayNotice(vo);
    }

    /**
     * 查看服务进程
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto<List<ServiceProcessDto>>> serviceProcess(OrderVo vo) {
        return RequetRetrofit.getInstance().serviceProcess(vo);
    }


    /**
     * 上门签到
     *
     * @param vo
     * @param files
     * @param mediaType
     * @return
     */
    public static Flowable<BaseDto> visitSign(VisitSignVo vo, List<File> files, String mediaType) {
        return RequetRetrofit.getInstance().visitSign(HttpUtil.uploadParamFiles(vo, files, mediaType));
    }

    /**
     * 水工报单
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> reportOrder(ReportOrderVo vo,List<File> files, String mediaType) {
        return RequetRetrofit.getInstance().reportOrder(HttpUtil.uploadParamAndFiles(vo, files, mediaType));
    }

    /**
     * 退单
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> withdrawOrder(WithdrawOrderVo vo) {
        return RequetRetrofit.getInstance().withdrawOrder(vo);
    }

    /**
     * 退单次数
     * @return
     */
    public static Flowable<BaseDto<String>> withdrawCount(WithdrawCountVo vo) {
        return RequetRetrofit.getInstance().withdrawCount(vo);
    }


    /**
     * 订单详情
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto<OrderDetailDto>> queryDetail(OrderVo vo) {
        return RequetRetrofit.getInstance().queryDetail(vo);
    }

    /**
     * 水工绩效
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto<PerformListDto>> performance(PerformanceVo vo) {
        return RequetRetrofit.getInstance().performance(vo);
    }

    /**
     * 水工评分
     *
     * @param
     * @return
     */
    public static Flowable<BaseDto<EvaluateDto>> evaluate() {
        return RequetRetrofit.getInstance().evaluate();
    }

    /**
     * 多人水工
     *
     * @return
     */
    public static Flowable<BaseDto<List<MemberDto>>> queryMember(MemberVo vo) {
        return RequetRetrofit.getInstance().queryMember(vo);
    }

    /**
     * 设置水工工作量
     *
     * @return
     */
    public static Flowable<BaseDto> updateWork(UpdateWorkVo vo) {
        return RequetRetrofit.getInstance().updateWork(vo);
    }

    /**
     * 工单地图
     *
     * @return
     */
    public static Flowable<BaseDto<PlanPathListDto>> planPath() {
        return RequetRetrofit.getInstance().planPath();
    }

    /**
     * 上传凭据（表单提交）
     *
     * @return
     */
    public static Flowable<BaseDto<List<FinishImgDto>>> uploadFinishImg(FinishImgVo vo, List<File> files, String mediaType) {
        return RequetRetrofit.getInstance().uploadFinishImg(HttpUtil.uploadParamFiles(vo, files, mediaType));

    }

    /**
     * 完成支付
     *
     * @param vo
     * @param files
     * @param mediaType
     * @return
     */
    public static Flowable<BaseDto<FinishPayDto>> finishPay(FinishPayVo vo, List<File> files, String mediaType) {
        return RequetRetrofit.getInstance().finishPay(HttpUtil.uploadParamAndFiles(vo, files, mediaType));

    }


    /**
     * 获取服务列表
     *
     * @return
     */
    public static Flowable<BaseDto<List<ProvinceBean>>> queryAllOffice() {
        return RequetRetrofit.getInstance().queryAllOffice();
    }

    /**
     * 订单完成填写接口
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> finishOrder(FinishOrderVo vo) {
        return RequetRetrofit.getInstance().finishOrder(vo);
    }

    /**
     * 提交订单到支付
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto<Long>> commitOrder(OrderVo vo) {
        return RequetRetrofit.getInstance().commitOrder(vo);
    }

    /**
     * 添加到购物车
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> addProductToShoppingCart(ProductToShoppingCartVo vo) {
        return RequetRetrofit.getInstance().addProductToShoppingCart(vo);
    }

    /**
     * 查询购物车
     *
     * @return
     */
    public static Flowable<BaseDto<List<ProductDetailDto>>> getShoppingCartProducts() {
        return RequetRetrofit.getInstance().getShoppingCartProducts();
    }

    /**
     * 购物车-修改对应的购物车
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> updateShopCart(UpdateShopCartVo vo) {
        return RequetRetrofit.getInstance().updateShopCart(vo);
    }



    /**
     * 购物车-添加到订单
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto> addProductToOrder(AddProductToOrderVo vo) {
        return RequetRetrofit.getInstance().addProductToOrder(vo);
    }

    /**
     * 检查支付状态
     *
     * @param vo
     * @return
     */
    public static Flowable<BaseDto<String>> checkPayStatus(OrderVo vo) {
        return RequetRetrofit.getInstance().checkPayStatus(vo);
    }

    /**
     * 完成订单页面-初始化参数
     *
     * @return
     */
    public static Flowable<BaseDto<ParamsListDto>> initParams() {
        return RequetRetrofit.getInstance().initParams();
    }

    /**
     * 我的钱包
     * @return
     */
    public static Flowable<BaseDto<AccountDto>> account() {
        return RequetRetrofit.getInstance().account();
    }


    /**
     * 提现
     *
     * @return
     */
    public static Flowable<BaseDto> withdraw(WithdrawVo vo) {
        return RequetRetrofit.getInstance().withdraw(vo);
    }


    /**
     * 报单-下拉參數
     * @return
     */
    public static Flowable<BaseDto<ParamsListDto>> reportInitParam() {
        return RequetRetrofit.getInstance().reportInitParam();
    }

    /**
     * 判断是否已经签到
     * @return
     */
    public static Flowable<BaseDto<String>> checkSign(OrderVo vo) {
        return RequetRetrofit.getInstance().checkSign(vo);
    }




}
